/*Man H. Vu
 *CS 362 SE II
 *Testing fullDeckCount()
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <stdlib.h>


int main() {
	struct gameState *currGame = (struct gameState *)malloc(sizeof(struct gameState));
	int cards[9] = {tribute, gardens, embargo, sea_hag, village, mine, minion, cutpurse, adventurer};
	int player = 3;
	initializeGame(4, cards, 3121, currGame);

	if (fullDeckCount(player, copper, currGame) == 7){
        printf("Expected: 7 total coppers, Output: %d --- PASS \n",fullDeckCount(player, copper, currGame));
	}else{
        printf("Expected: 7 total coppers, Output does not match --- FAIL\n");
	}

	//Testing discard coppers to see if fullDeckCount can keep track of discarded cards
	currGame->discard[player][currGame->discardCount[player]] = copper;
	currGame->discardCount[player]++;

	if (fullDeckCount(player, copper, currGame) == 8){
        printf("Expected: 8 total coppers, Output: %d --- PASS\n",fullDeckCount(player, copper, currGame));
	}else{
        printf("Expected: 8 total coppers, Output %d does not match ---- FAIL\n",fullDeckCount(player, copper, currGame));
	}

	currGame->discard[player][currGame->discardCount[player]] = copper;
	currGame->discardCount[player]--;
	currGame->discard[player][currGame->discardCount[player]] = copper;
	currGame->discardCount[player]++;
	currGame->discard[player][currGame->discardCount[player]] = copper;
	currGame->discardCount[player]++;
	if (fullDeckCount(player, copper, currGame) == 9){
        printf("Expected: 9 total coppers, Output: %d --- PASS\n",fullDeckCount(player, copper, currGame));
	}else{
        printf("Expected: 9 total coppers, Output %d does not match ---- FAIL\n",fullDeckCount(player, copper, currGame));
	}
	return 0;
}




